<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>
<script type="text/javascript">
<!--
	$(function(){
	$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
	$("#link_name").formValidator({onshow:"<?php echo L("input").L('link_name')?>",onfocus:"<?php echo L("input").L('link_name')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('link_name')?>"});
 	$("#link_url").formValidator({onshow:"<?php echo L("input").L('url')?>",onfocus:"<?php echo L("input").L('url')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('url')?>"}).regexValidator({regexp:"^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&]*([^<>])*$",onerror:"<?php echo L('link_onerror')?>"})
	 
	})
//-->
</script>

<div class="pad_10">
<form action="?m=ask&c=ask&a=edit&id=<?php echo $data['id'];?>" method="post" name="myform" id="myform">
<table cellpadding="2" cellspacing="1" class="table_form" width="100%">
	<tr>
		<th width="100">姓名：</th>
		<td><?php echo $data['username'];?></td>
	</tr>
	
	<tr>
		<th width="100">电话：</th>
		<td><?php echo $data['phone'];?></td>
	</tr>
	
	<tr id="logolink">
		<th width="100">问题：</th>
		<td><?php echo $data['question'];?></td>
	</tr>
	
	<tr>
		<th width="100">提问时间：</th>
		<td><?php echo date('Y/m/d H:i:s',$data['q_time']);?></td>
	</tr>

 
	<tr>
		<th>回答：</th>
		<td>
            <?php 
                if($data['is_ask'] == 0) {
            ?>
                <textarea name="ask[ask]" id="ask" cols="50" rows="6" dis>暂无回复...</textarea>
            <?php }else {?>
                <textarea name="ask[ask]" id="ask" cols="50" rows="6"><?php echo $data['ask'];?></textarea>
            <?php }?>
        </td>
	</tr>

 
	<tr>
		<th>回答时间：</th>
		<td>
        <?php 
                if($data['a_time'] == 0) {
                    echo "还没回复...";
                }else{
                    echo date('Y/m/d H:i:s',$data['a_time']);
                }
            ?>
        </td>
	</tr>
	 
	<tr>
        <th></th>
        <td><input type="hidden" name="ask[is_ask]" value="<?php echo $data['is_ask'];?>"></td>
    </tr>

    <tr>
		<th></th>
		<td><input type="hidden" name="forward" value="?m=ask&c=ask&a=edit"> <input
		type="submit" name="dosubmit" id="dosubmit" class="dialog"
		value=" <?php echo L('submit')?> "></td>
	</tr>

</table>
</form>
</div>
</body>
</html> 